package com.metnods;

/**
 * 非机动车类
 * 2017-08-15
 * @author Erik
 * @version 0.1
 * @since JDK1.8
 */
public class NonMotor {
    private String kind;        //品牌
    private String color;       //颜色
    private int wheelNum;       //轮子数量
    private int cheerNun;       //座椅数量

    public NonMotor(){}

    /**
     * 双参数构造
     * @param kind  品牌
     * @param color 颜色
     */
    public NonMotor(String kind, String color)
    {
        setKind(kind);
        setColor(color);
    }

    /**
     * 四参数构造函数,初始化所有成员
     * @param kind  品牌
     * @param color 颜色
     * @param wheelNum  轮子数量
     * @param cheerNun  座位数量
     */
    public NonMotor(String kind, String color, int wheelNum, int cheerNun){
        setKind(kind);
        setColor(color);
        setWheelNum(wheelNum);
        setCheerNun(cheerNun);
    }

    //setters
    public void setKind(String kind)        {   this.kind=kind;          }
    public void setColor(String color)      {   this.color=color;       }
    public void setWheelNum(int wheelNum)   {   this.wheelNum=wheelNum; }
    public void setCheerNun(int cheerNun)   {   this.cheerNun=cheerNun; }

    //getters
    public String getKind()     {   return this.kind;       }
    public String getColor()    {   return this.color;      }
    public int getWheelNum()    {   return this.wheelNum;   }
    public int getCheerNun()    {   return this.cheerNun;   }

    public String work(){
         String str="这是一辆"+this.getColor()+"颜色,"
                +this.getKind()+"牌的非机动车,有"
                +this.getWheelNum()+"个轮子,"
                +this.getCheerNun()+"个座椅的机动车";
        return str;
    }

}
